##################
# UDP客户端
# 实现一个简单都四则运算计算器
##################

from socket import *

# 定义常量
IP = '127.0.0.1'
PORT = 12000

sock = socket(AF_INET, SOCK_DGRAM)
data = input('Input a four-arithmetic operations: ')
sock.sendto(data.encode(), (IP, PORT))
result, serverAddr = sock.recvfrom(2048)
print(result.decode())
sock.close()

